const sequelize = require('../sequlize-config');
const Sequelize = require('sequelize');
const Participant = sequelize.define('Participant', {
    name: { type: Sequelize.STRING, allowNull: false },
    number: { type: Sequelize.INTEGER(11), allowNull: false },
    aid: {
        type: Sequelize.INTEGER(11),
        allowNull: false,
        references: {
            model: "Activities",
            key: "aid"
        }
    }
}, {
        tableName: 'participant'
    });
//这个比较奇怪，我这张表其实是没有主键的，必须在这个位置手动移除掉sequelize默认添加的主键id
Participant.removeAttribute('id');
module.exports = Participant;